const app = getApp();
Page({

  data: {
    levels: [
      {
        value: 1,
        name: '一般'
      },
      {
        value: 2,
        name: '熟练'
      },
      {
        value: 3,
        name: '良好'
      },
      {
        value: 4,
        name: '精通'
      }
    ],
    knowledgeList: [{
      name: "",
      level: "",
      use_month: ""
    }]
  },

  onLoad: function () {
    
  },

  onShow: function () {

  },

  get_name: function(e){
    var that=this;
    that.setData({
      name:e.detail.value
    })
  },

  get_use_month: function(e){
    var that=this;
    that.setData({
      use_month:e.detail.value
    })
  },

  bindPickerChange: function(e) {
    console.log(e)
    this.setData({
      [`knowledgeList[${e.currentTarget.dataset.info}].level`]: e.detail.value
    })
  },

})